package com.xc.c1

object args {

  def main(args: Array[String]): Unit = {
    println(sum(1,2,3))
  }

  def sum(n1:Int,args:Int*): Int ={
    var sum = n1;
    for (item <- args){
      sum += item
    }
    sum
  }

}
